<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>uCXpresso.BLE: CSerial Class Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../upnp.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">uCXpresso.BLE
   &#160;<span id="projectnumber">v1.0.4</span>
   </div>
   <div id="projectbrief">RTOS C++ Framework for Bluetooth Low Energy</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="../../index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="../../modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="../../annotated.html"><span>Classes</span></a></li>
      <li><a href="../../examples.html"><span>Examples</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="../../search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="../../annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="../../classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="../../hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="../../functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('d8/d1d/class_c_serial.html','../../');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Groups</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="../../d4/daa/class_c_serial-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">CSerial Class Reference<div class="ingroups"><a class="el" href="../../d1/d6c/group___peripherals.html">Peripherals</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &quot;<a class="el" href="../../db/d11/serial_8h_source.html">class/serial.h</a>&quot;</code></p>
<div class="dynheader">
Inheritance diagram for CSerial:</div>
<div class="dyncontent">
 <div class="center">
  <img src="../../d8/d1d/class_c_serial.png" usemap="#CSerial_map" alt=""/>
  <map id="CSerial_map" name="CSerial_map">
<area href="../../d4/d16/class_c_stream.html" alt="CStream" shape="rect" coords="0,56,60,80"/>
<area href="../../dc/dac/class_c_object.html" alt="CObject" shape="rect" coords="0,0,60,24"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:ad38b0926868c6cfabb59e2da94f1cf40"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d1d/class_c_serial.html#ad38b0926868c6cfabb59e2da94f1cf40">UART_PARITY_T</a> { <br/>
&#160;&#160;<a class="el" href="../../d8/d1d/class_c_serial.html#ad38b0926868c6cfabb59e2da94f1cf40a77e567bbd57497e51b0161ed1cd855a4">UART_PARITY_NONE</a> = 4, 
<a class="el" href="../../d8/d1d/class_c_serial.html#ad38b0926868c6cfabb59e2da94f1cf40aa157a4ef710e04651e3aaf61a4d96ad9">UART_PARITY_ODD</a> = 0, 
<a class="el" href="../../d8/d1d/class_c_serial.html#ad38b0926868c6cfabb59e2da94f1cf40a4b7452e8ef848287eca86b7ea4411e65">UART_PARITY_EVEN</a> = 1, 
<a class="el" href="../../d8/d1d/class_c_serial.html#ad38b0926868c6cfabb59e2da94f1cf40a20c9bc3b3fa95b78898159cd2680e007">UART_PARITY_SP_1</a> = 2, 
<br/>
&#160;&#160;<a class="el" href="../../d8/d1d/class_c_serial.html#ad38b0926868c6cfabb59e2da94f1cf40a660aab6ba15f9c94cc9963ff226a77eb">UART_PARITY_SP_0</a> = 3
<br/>
 }</td></tr>
<tr class="memdesc:ad38b0926868c6cfabb59e2da94f1cf40"><td class="mdescLeft">&#160;</td><td class="mdescRight">UART Parity type definitions.  <a href="../../d8/d1d/class_c_serial.html#ad38b0926868c6cfabb59e2da94f1cf40">More...</a><br/></td></tr>
<tr class="separator:ad38b0926868c6cfabb59e2da94f1cf40"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a628c8c9be04f0315c4dae70ce8ccc5b3"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d1d/class_c_serial.html#a628c8c9be04f0315c4dae70ce8ccc5b3">UART_DATABIT_T</a> { <a class="el" href="../../d8/d1d/class_c_serial.html#a628c8c9be04f0315c4dae70ce8ccc5b3a7ac317a766becd83f58a2daa007fed1e">UART_DATABIT_5</a> = 0, 
<a class="el" href="../../d8/d1d/class_c_serial.html#a628c8c9be04f0315c4dae70ce8ccc5b3a6c31f7e06c7a6779b6d72d37aba52fb1">UART_DATABIT_6</a>, 
<a class="el" href="../../d8/d1d/class_c_serial.html#a628c8c9be04f0315c4dae70ce8ccc5b3abf533a46435efaddb8e38b9b9fe53eff">UART_DATABIT_7</a>, 
<a class="el" href="../../d8/d1d/class_c_serial.html#a628c8c9be04f0315c4dae70ce8ccc5b3a196b716ca31d23301c1059b53ac35f25">UART_DATABIT_8</a>
 }</td></tr>
<tr class="memdesc:a628c8c9be04f0315c4dae70ce8ccc5b3"><td class="mdescLeft">&#160;</td><td class="mdescRight">UART Databit type definitions.  <a href="../../d8/d1d/class_c_serial.html#a628c8c9be04f0315c4dae70ce8ccc5b3">More...</a><br/></td></tr>
<tr class="separator:a628c8c9be04f0315c4dae70ce8ccc5b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af02af389f5596b7b40cf0d2ece57b04b"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d1d/class_c_serial.html#af02af389f5596b7b40cf0d2ece57b04b">UART_STOPBIT_T</a> { <a class="el" href="../../d8/d1d/class_c_serial.html#af02af389f5596b7b40cf0d2ece57b04ba6351eeac6c2e865ed9019323e2491907">UART_STOPBIT_1</a> = (0), 
<a class="el" href="../../d8/d1d/class_c_serial.html#af02af389f5596b7b40cf0d2ece57b04bafe7ff299f68959471436234643298e71">UART_STOPBIT_2</a>
 }</td></tr>
<tr class="memdesc:af02af389f5596b7b40cf0d2ece57b04b"><td class="mdescLeft">&#160;</td><td class="mdescRight">UART Stop bit type definitions.  <a href="../../d8/d1d/class_c_serial.html#af02af389f5596b7b40cf0d2ece57b04b">More...</a><br/></td></tr>
<tr class="separator:af02af389f5596b7b40cf0d2ece57b04b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a767bb157f0f469eb5bf5c99b8ada42f1"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d1d/class_c_serial.html#a767bb157f0f469eb5bf5c99b8ada42f1">UART_FITO_LEVEL_T</a> { <a class="el" href="../../d8/d1d/class_c_serial.html#a767bb157f0f469eb5bf5c99b8ada42f1aec8c4b69719ee6b1dc43cf6ccdd999de">UART_FIFO_TRGLEV0</a> = 0, 
<a class="el" href="../../d8/d1d/class_c_serial.html#a767bb157f0f469eb5bf5c99b8ada42f1a2d29eb800e28d845f00b9fd5df1b955c">UART_FIFO_TRGLEV1</a>, 
<a class="el" href="../../d8/d1d/class_c_serial.html#a767bb157f0f469eb5bf5c99b8ada42f1a3ca31e41f3d74e387b0ff625a927bcf4">UART_FIFO_TRGLEV2</a>, 
<a class="el" href="../../d8/d1d/class_c_serial.html#a767bb157f0f469eb5bf5c99b8ada42f1a6893ab299c8d6be2e17efb39cd05e1a1">UART_FIFO_TRGLEV3</a>
 }</td></tr>
<tr class="memdesc:a767bb157f0f469eb5bf5c99b8ada42f1"><td class="mdescLeft">&#160;</td><td class="mdescRight">RX FIFO Trigger Level type definitions.  <a href="../../d8/d1d/class_c_serial.html#a767bb157f0f469eb5bf5c99b8ada42f1">More...</a><br/></td></tr>
<tr class="separator:a767bb157f0f469eb5bf5c99b8ada42f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ad528b7355f527eabc415f6a8017745f4"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d1d/class_c_serial.html#ad528b7355f527eabc415f6a8017745f4">CSerial</a> (size_t fifo_size=32)</td></tr>
<tr class="separator:ad528b7355f527eabc415f6a8017745f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aff7c822bada51065ad52542fb9515be6"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d1d/class_c_serial.html#aff7c822bada51065ad52542fb9515be6">enable</a> (uint32_t baudrate, <a class="el" href="../../d8/d1d/class_c_serial.html#ad38b0926868c6cfabb59e2da94f1cf40">UART_PARITY_T</a> parity=<a class="el" href="../../d8/d1d/class_c_serial.html#ad38b0926868c6cfabb59e2da94f1cf40a77e567bbd57497e51b0161ed1cd855a4">UART_PARITY_NONE</a>, <a class="el" href="../../d8/d1d/class_c_serial.html#a628c8c9be04f0315c4dae70ce8ccc5b3">UART_DATABIT_T</a> databits=<a class="el" href="../../d8/d1d/class_c_serial.html#a628c8c9be04f0315c4dae70ce8ccc5b3a196b716ca31d23301c1059b53ac35f25">UART_DATABIT_8</a>, <a class="el" href="../../d8/d1d/class_c_serial.html#af02af389f5596b7b40cf0d2ece57b04b">UART_STOPBIT_T</a> stopbits=<a class="el" href="../../d8/d1d/class_c_serial.html#af02af389f5596b7b40cf0d2ece57b04ba6351eeac6c2e865ed9019323e2491907">UART_STOPBIT_1</a>, <a class="el" href="../../d8/d1d/class_c_serial.html#a767bb157f0f469eb5bf5c99b8ada42f1">UART_FITO_LEVEL_T</a> level=<a class="el" href="../../d8/d1d/class_c_serial.html#a767bb157f0f469eb5bf5c99b8ada42f1aec8c4b69719ee6b1dc43cf6ccdd999de">UART_FIFO_TRGLEV0</a>)</td></tr>
<tr class="separator:aff7c822bada51065ad52542fb9515be6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0c80ea521e310305579e787f21a55233"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d1d/class_c_serial.html#a0c80ea521e310305579e787f21a55233">settings</a> (uint32_t baudrate, <a class="el" href="../../d8/d1d/class_c_serial.html#ad38b0926868c6cfabb59e2da94f1cf40">UART_PARITY_T</a> parity=<a class="el" href="../../d8/d1d/class_c_serial.html#ad38b0926868c6cfabb59e2da94f1cf40a77e567bbd57497e51b0161ed1cd855a4">UART_PARITY_NONE</a>, <a class="el" href="../../d8/d1d/class_c_serial.html#a628c8c9be04f0315c4dae70ce8ccc5b3">UART_DATABIT_T</a> databits=<a class="el" href="../../d8/d1d/class_c_serial.html#a628c8c9be04f0315c4dae70ce8ccc5b3a196b716ca31d23301c1059b53ac35f25">UART_DATABIT_8</a>, <a class="el" href="../../d8/d1d/class_c_serial.html#af02af389f5596b7b40cf0d2ece57b04b">UART_STOPBIT_T</a> stopbits=<a class="el" href="../../d8/d1d/class_c_serial.html#af02af389f5596b7b40cf0d2ece57b04ba6351eeac6c2e865ed9019323e2491907">UART_STOPBIT_1</a>, <a class="el" href="../../d8/d1d/class_c_serial.html#a767bb157f0f469eb5bf5c99b8ada42f1">UART_FITO_LEVEL_T</a> level=<a class="el" href="../../d8/d1d/class_c_serial.html#a767bb157f0f469eb5bf5c99b8ada42f1aec8c4b69719ee6b1dc43cf6ccdd999de">UART_FIFO_TRGLEV0</a>)</td></tr>
<tr class="separator:a0c80ea521e310305579e787f21a55233"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0748723f610ddcfdc34286dbbfbd4917"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d1d/class_c_serial.html#a0748723f610ddcfdc34286dbbfbd4917">readable</a> ()</td></tr>
<tr class="separator:a0748723f610ddcfdc34286dbbfbd4917"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac59cfe80216e1fb7eb479017f0bb8e7f"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d1d/class_c_serial.html#ac59cfe80216e1fb7eb479017f0bb8e7f">writeable</a> ()</td></tr>
<tr class="separator:ac59cfe80216e1fb7eb479017f0bb8e7f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9b658bf4bc4d81413627bc2fe81e1471"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d1d/class_c_serial.html#a9b658bf4bc4d81413627bc2fe81e1471">read</a> (void *buf, int len, bool block=true)</td></tr>
<tr class="separator:a9b658bf4bc4d81413627bc2fe81e1471"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adef6d3e77843c65617b7cb555c2f8732"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d1d/class_c_serial.html#adef6d3e77843c65617b7cb555c2f8732">write</a> (const void *buf, int len, bool block=true)</td></tr>
<tr class="separator:adef6d3e77843c65617b7cb555c2f8732"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a68aecf6351423ae0e8791870c9e694bf"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d1d/class_c_serial.html#a68aecf6351423ae0e8791870c9e694bf">flush</a> ()</td></tr>
<tr class="separator:a68aecf6351423ae0e8791870c9e694bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a130edee149575f50f62013180a1b5bef"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d1d/class_c_serial.html#a130edee149575f50f62013180a1b5bef">begin</a> (uint32_t speed)</td></tr>
<tr class="separator:a130edee149575f50f62013180a1b5bef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a21d6a27113d6370eb3a69c26b28b232a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d1d/class_c_serial.html#a21d6a27113d6370eb3a69c26b28b232a">end</a> ()</td></tr>
<tr class="separator:a21d6a27113d6370eb3a69c26b28b232a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5c142221c0841e7c961e962c45bd2db7"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d1d/class_c_serial.html#a5c142221c0841e7c961e962c45bd2db7">available</a> ()</td></tr>
<tr class="separator:a5c142221c0841e7c961e962c45bd2db7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae7c133c4586cd5ca729cd026f813a8a0"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d1d/class_c_serial.html#ae7c133c4586cd5ca729cd026f813a8a0">isConnected</a> ()</td></tr>
<tr class="separator:ae7c133c4586cd5ca729cd026f813a8a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9dc5498e6cae5a2d0d12cb57fc6ee335"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d1d/class_c_serial.html#a9dc5498e6cae5a2d0d12cb57fc6ee335">handshaking</a> ()</td></tr>
<tr class="separator:a9dc5498e6cae5a2d0d12cb57fc6ee335"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af56764abe8954430eede10e253f8994f"><td class="memItemLeft" align="right" valign="top">virtual uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d16/class_c_stream.html#af56764abe8954430eede10e253f8994f">read</a> ()</td></tr>
<tr class="separator:af56764abe8954430eede10e253f8994f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a48041fea5cad32feaeef543bcaa2d37d"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d16/class_c_stream.html#a48041fea5cad32feaeef543bcaa2d37d">write</a> (uint8_t c)</td></tr>
<tr class="separator:a48041fea5cad32feaeef543bcaa2d37d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2c6130bd65b00f278045d8b7b8ea7f84"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="../../d4/d16/class_c_stream.html">CStream</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d16/class_c_stream.html#a2c6130bd65b00f278045d8b7b8ea7f84">operator&lt;&lt;</a> (uint8_t c)</td></tr>
<tr class="separator:a2c6130bd65b00f278045d8b7b8ea7f84"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad2f2d74f0924caa2e863d049fe9ada80"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="../../d4/d16/class_c_stream.html">CStream</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d16/class_c_stream.html#ad2f2d74f0924caa2e863d049fe9ada80">operator&lt;&lt;</a> (<a class="el" href="../../d4/d16/class_c_stream.html">CStream</a> &amp;s)</td></tr>
<tr class="separator:ad2f2d74f0924caa2e863d049fe9ada80"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af2bd1778d5f5cfab469e5df615e1c8fc"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="../../d4/d16/class_c_stream.html">CStream</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d16/class_c_stream.html#af2bd1778d5f5cfab469e5df615e1c8fc">operator&gt;&gt;</a> (uint8_t c)</td></tr>
<tr class="separator:af2bd1778d5f5cfab469e5df615e1c8fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acbaa22d4608c1a015a20104fde6c8ccf"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d16/class_c_stream.html#acbaa22d4608c1a015a20104fde6c8ccf">operator uint8_t</a> ()</td></tr>
<tr class="separator:acbaa22d4608c1a015a20104fde6c8ccf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acc833c2eea18af67b57ba641ec58fea7"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d16/class_c_stream.html#acc833c2eea18af67b57ba641ec58fea7">operator char</a> ()</td></tr>
<tr class="separator:acc833c2eea18af67b57ba641ec58fea7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a26a76c241a4d62d2efdac57d2cfe4c0f"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dc/dac/class_c_object.html#a26a76c241a4d62d2efdac57d2cfe4c0f">isThread</a> ()</td></tr>
<tr class="separator:a26a76c241a4d62d2efdac57d2cfe4c0f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Use the <a class="el" href="../../d8/d1d/class_c_serial.html">CSerial</a> class to transceiver the serial stream. </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../d4/d70/_2ble_2ble_heartrate_2src_2main_8cpp-example.html#_a14">/ble/ble_heartrate/src/main.cpp</a>, <a class="el" href="../../d5/df3/_2ble_2ble_multiple_2src_2main_8cpp-example.html#_a21">/ble/ble_multiple/src/main.cpp</a>, <a class="el" href="../../d7/d19/_2ble_2ble_proximity_2src_2main_8cpp-example.html#_a13">/ble/ble_proximity/src/main.cpp</a>, <a class="el" href="../../db/de1/_2misc_2garbage_collector_2src_2main_8cpp-example.html#_a13">/misc/garbage_collector/src/main.cpp</a>, <a class="el" href="../../d5/dec/_2peripheral_2adc_2src_2main_8cpp-example.html#_a2">/peripheral/adc/src/main.cpp</a>, <a class="el" href="../../de/dd2/_2peripheral_2eeprom_2src_2main_8cpp-example.html#_a2">/peripheral/eeprom/src/main.cpp</a>, <a class="el" href="../../df/dd4/_2peripheral_2i2c_scanner_2src_2main_8cpp-example.html#_a2">/peripheral/i2c_scanner/src/main.cpp</a>, <a class="el" href="../../d9/da4/_2peripheral_2power_2src_2main_8cpp-example.html#_a8">/peripheral/power/src/main.cpp</a>, <a class="el" href="../../d5/d72/_2peripheral_2spi_2src_2main_8cpp-example.html#_a2">/peripheral/spi/src/main.cpp</a>, <a class="el" href="../../d3/d38/_2peripheral_2timer_2src_2main_8cpp-example.html#_a2">/peripheral/timer/src/main.cpp</a>, <a class="el" href="../../d1/d0a/_2peripheral_2uart_2src_2main_8cpp-example.html#_a0">/peripheral/uart/src/main.cpp</a>, <a class="el" href="../../d0/d46/_2peripheral_2watchdog_2src_2main_8cpp-example.html#_a10">/peripheral/watchdog/src/main.cpp</a>, and <a class="el" href="../../da/da9/_2rtos_2blink_thread_2src_2main_8cpp-example.html#_a10">/rtos/blink_thread/src/main.cpp</a>.</dd>
</dl></div><h2 class="groupheader">Member Enumeration Documentation</h2>
<a class="anchor" id="a628c8c9be04f0315c4dae70ce8ccc5b3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="../../d8/d1d/class_c_serial.html#a628c8c9be04f0315c4dae70ce8ccc5b3">CSerial::UART_DATABIT_T</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>UART Databit type definitions. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="a628c8c9be04f0315c4dae70ce8ccc5b3a7ac317a766becd83f58a2daa007fed1e"></a>UART_DATABIT_5</em>&#160;</td><td class="fielddoc">
<p>UART 5 bit data mode </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a628c8c9be04f0315c4dae70ce8ccc5b3a6c31f7e06c7a6779b6d72d37aba52fb1"></a>UART_DATABIT_6</em>&#160;</td><td class="fielddoc">
<p>UART 6 bit data mode </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a628c8c9be04f0315c4dae70ce8ccc5b3abf533a46435efaddb8e38b9b9fe53eff"></a>UART_DATABIT_7</em>&#160;</td><td class="fielddoc">
<p>UART 7 bit data mode </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a628c8c9be04f0315c4dae70ce8ccc5b3a196b716ca31d23301c1059b53ac35f25"></a>UART_DATABIT_8</em>&#160;</td><td class="fielddoc">
<p>UART 8 bit data mode </p>
</td></tr>
</table>

</div>
</div>
<a class="anchor" id="a767bb157f0f469eb5bf5c99b8ada42f1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="../../d8/d1d/class_c_serial.html#a767bb157f0f469eb5bf5c99b8ada42f1">CSerial::UART_FITO_LEVEL_T</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>RX FIFO Trigger Level type definitions. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="a767bb157f0f469eb5bf5c99b8ada42f1aec8c4b69719ee6b1dc43cf6ccdd999de"></a>UART_FIFO_TRGLEV0</em>&#160;</td><td class="fielddoc">
<p>UART FIFO trigger level 0: 1 character </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a767bb157f0f469eb5bf5c99b8ada42f1a2d29eb800e28d845f00b9fd5df1b955c"></a>UART_FIFO_TRGLEV1</em>&#160;</td><td class="fielddoc">
<p>UART FIFO trigger level 1: 4 character </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a767bb157f0f469eb5bf5c99b8ada42f1a3ca31e41f3d74e387b0ff625a927bcf4"></a>UART_FIFO_TRGLEV2</em>&#160;</td><td class="fielddoc">
<p>UART FIFO trigger level 2: 8 character </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a767bb157f0f469eb5bf5c99b8ada42f1a6893ab299c8d6be2e17efb39cd05e1a1"></a>UART_FIFO_TRGLEV3</em>&#160;</td><td class="fielddoc">
<p>UART FIFO trigger level 3: 14 character </p>
</td></tr>
</table>

</div>
</div>
<a class="anchor" id="ad38b0926868c6cfabb59e2da94f1cf40"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="../../d8/d1d/class_c_serial.html#ad38b0926868c6cfabb59e2da94f1cf40">CSerial::UART_PARITY_T</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>UART Parity type definitions. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="ad38b0926868c6cfabb59e2da94f1cf40a77e567bbd57497e51b0161ed1cd855a4"></a>UART_PARITY_NONE</em>&#160;</td><td class="fielddoc">
<p>No parity </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ad38b0926868c6cfabb59e2da94f1cf40aa157a4ef710e04651e3aaf61a4d96ad9"></a>UART_PARITY_ODD</em>&#160;</td><td class="fielddoc">
<p>Odd parity </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ad38b0926868c6cfabb59e2da94f1cf40a4b7452e8ef848287eca86b7ea4411e65"></a>UART_PARITY_EVEN</em>&#160;</td><td class="fielddoc">
<p>Even parity </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ad38b0926868c6cfabb59e2da94f1cf40a20c9bc3b3fa95b78898159cd2680e007"></a>UART_PARITY_SP_1</em>&#160;</td><td class="fielddoc">
<p>Forced "1" stick parity </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ad38b0926868c6cfabb59e2da94f1cf40a660aab6ba15f9c94cc9963ff226a77eb"></a>UART_PARITY_SP_0</em>&#160;</td><td class="fielddoc">
<p>Forced "0" stick parity </p>
</td></tr>
</table>

</div>
</div>
<a class="anchor" id="af02af389f5596b7b40cf0d2ece57b04b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="../../d8/d1d/class_c_serial.html#af02af389f5596b7b40cf0d2ece57b04b">CSerial::UART_STOPBIT_T</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>UART Stop bit type definitions. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="af02af389f5596b7b40cf0d2ece57b04ba6351eeac6c2e865ed9019323e2491907"></a>UART_STOPBIT_1</em>&#160;</td><td class="fielddoc">
<p>UART 1 Stop Bits Select </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="af02af389f5596b7b40cf0d2ece57b04bafe7ff299f68959471436234643298e71"></a>UART_STOPBIT_2</em>&#160;</td><td class="fielddoc">
<p>UART Two Stop Bits Select </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ad528b7355f527eabc415f6a8017745f4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">CSerial::CSerial </td>
          <td>(</td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>fifo_size</em> = <code>32</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Constructs a <a class="el" href="../../d8/d1d/class_c_serial.html">CSerial</a> object. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">fifo_size</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a5c142221c0841e7c961e962c45bd2db7"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int CSerial::available </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Call the member function to check that receive buffer is ready. </p>
<dl class="section note"><dt>Note</dt><dd>The 'available' is an inline code to call the exist <a class="el" href="../../d8/d1d/class_c_serial.html#a0748723f610ddcfdc34286dbbfbd4917">readable()</a> member function. </dd></dl>

</div>
</div>
<a class="anchor" id="a130edee149575f50f62013180a1b5bef"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void CSerial::begin </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>speed</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="aff7c822bada51065ad52542fb9515be6"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void CSerial::enable </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>baudrate</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d8/d1d/class_c_serial.html#ad38b0926868c6cfabb59e2da94f1cf40">UART_PARITY_T</a>&#160;</td>
          <td class="paramname"><em>parity</em> = <code><a class="el" href="../../d8/d1d/class_c_serial.html#ad38b0926868c6cfabb59e2da94f1cf40a77e567bbd57497e51b0161ed1cd855a4">UART_PARITY_NONE</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d8/d1d/class_c_serial.html#a628c8c9be04f0315c4dae70ce8ccc5b3">UART_DATABIT_T</a>&#160;</td>
          <td class="paramname"><em>databits</em> = <code><a class="el" href="../../d8/d1d/class_c_serial.html#a628c8c9be04f0315c4dae70ce8ccc5b3a196b716ca31d23301c1059b53ac35f25">UART_DATABIT_8</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d8/d1d/class_c_serial.html#af02af389f5596b7b40cf0d2ece57b04b">UART_STOPBIT_T</a>&#160;</td>
          <td class="paramname"><em>stopbits</em> = <code><a class="el" href="../../d8/d1d/class_c_serial.html#af02af389f5596b7b40cf0d2ece57b04ba6351eeac6c2e865ed9019323e2491907">UART_STOPBIT_1</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d8/d1d/class_c_serial.html#a767bb157f0f469eb5bf5c99b8ada42f1">UART_FITO_LEVEL_T</a>&#160;</td>
          <td class="paramname"><em>level</em> = <code><a class="el" href="../../d8/d1d/class_c_serial.html#a767bb157f0f469eb5bf5c99b8ada42f1aec8c4b69719ee6b1dc43cf6ccdd999de">UART_FIFO_TRGLEV0</a></code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Call the member function to enable the serial port. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">baudrate</td><td>is a unsigned long integer to specified the data baud-rate. </td></tr>
    <tr><td class="paramname">parity</td><td>is an UART_PARITY_T enumerations. </td></tr>
    <tr><td class="paramname">databits</td><td>is an UART_DATABIT_T enumerations. </td></tr>
    <tr><td class="paramname">stopbits</td><td>is an UART_STOPBIT_T enumerations. </td></tr>
    <tr><td class="paramname">level</td><td>is UART_FITO_LEVEL_T to trigger how many receiver UARTn FIFO characters must be written before an interrupt or DMA request is activated. </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../d1/d0a/_2peripheral_2uart_2src_2main_8cpp-example.html#a12">/peripheral/uart/src/main.cpp</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="a21d6a27113d6370eb3a69c26b28b232a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void CSerial::end </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a68aecf6351423ae0e8791870c9e694bf"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void CSerial::flush </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Call the member function to wait for transmission of outgoing serial data to complete. </p>

<p>Reimplemented from <a class="el" href="../../d4/d16/class_c_stream.html#a5bd707b33627e01c2069b14bbf10694a">CStream</a>.</p>

</div>
</div>
<a class="anchor" id="a9dc5498e6cae5a2d0d12cb57fc6ee335"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CSerial::handshaking </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Enable hardware handshaking RTS/CTS pins </p>

</div>
</div>
<a class="anchor" id="ae7c133c4586cd5ca729cd026f813a8a0"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool CSerial::isConnected </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Call the member function to check that serial port is ready. </p>

<p>Reimplemented from <a class="el" href="../../d4/d16/class_c_stream.html#a7a152e6bda8654064634428d81bd81cb">CStream</a>.</p>

</div>
</div>
<a class="anchor" id="a26a76c241a4d62d2efdac57d2cfe4c0f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool CObject::isThread </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Check current object that inherits from <a class="el" href="../../d0/d26/class_c_thread.html">CThread</a> class or not. </p>
<dl class="section note"><dt>Note</dt><dd>The isTherad() will be override by <a class="el" href="../../d0/d26/class_c_thread.html">CThread</a> class. </dd></dl>

<p>Reimplemented in <a class="el" href="../../d0/d26/class_c_thread.html#ab2513fd0fcad30e2e6605609c91f1984">CThread</a>.</p>

</div>
</div>
<a class="anchor" id="acc833c2eea18af67b57ba641ec58fea7"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual CStream::operator char </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Operator 'char', to receive a char from stream. </p>
<div class="fragment"><div class="line"><a class="code" href="../../d8/d1d/class_c_serial.html">CSerial</a> uart;</div>
<div class="line">uart.<a class="code" href="../../d8/d1d/class_c_serial.html#aff7c822bada51065ad52542fb9515be6">enable</a>(19200);</div>
<div class="line"></div>
<div class="line"><span class="keywordtype">char</span> ch;</div>
<div class="line">ch = uart;</div>
</div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="acbaa22d4608c1a015a20104fde6c8ccf"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual CStream::operator uint8_t </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Operator 'uint8_t', to receive a byte from stream. </p>
<div class="fragment"><div class="line"><a class="code" href="../../d8/d1d/class_c_serial.html">CSerial</a> uart;</div>
<div class="line">uart.<a class="code" href="../../d8/d1d/class_c_serial.html#aff7c822bada51065ad52542fb9515be6">enable</a>(19200);</div>
<div class="line"></div>
<div class="line">uint8_t ch;</div>
<div class="line">ch = uart;</div>
</div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="a2c6130bd65b00f278045d8b7b8ea7f84"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="../../d4/d16/class_c_stream.html">CStream</a>&amp; CStream::operator&lt;&lt; </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>c</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Operator '&lt;&lt;', to output a byte to stream. </p>
<div class="fragment"><div class="line"><a class="code" href="../../d8/d1d/class_c_serial.html">CSerial</a> uart;</div>
<div class="line">uart.<a class="code" href="../../d8/d1d/class_c_serial.html#aff7c822bada51065ad52542fb9515be6">enable</a>(19200);</div>
<div class="line"></div>
<div class="line">uint8_t ch = 0xA5;</div>
<div class="line">uart &lt;&lt; ch;</div>
</div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="ad2f2d74f0924caa2e863d049fe9ada80"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="../../d4/d16/class_c_stream.html">CStream</a>&amp; CStream::operator&lt;&lt; </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d4/d16/class_c_stream.html">CStream</a> &amp;&#160;</td>
          <td class="paramname"><em>s</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Read a byte from right stream and send to left stream. </p>

</div>
</div>
<a class="anchor" id="af2bd1778d5f5cfab469e5df615e1c8fc"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="../../d4/d16/class_c_stream.html">CStream</a>&amp; CStream::operator&gt;&gt; </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>c</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Operator '&gt;&gt;', to input a byte from stream. </p>
<div class="fragment"><div class="line"><a class="code" href="../../d8/d1d/class_c_serial.html">CSerial</a> uart;</div>
<div class="line">uart.<a class="code" href="../../d8/d1d/class_c_serial.html#aff7c822bada51065ad52542fb9515be6">enable</a>(19200);</div>
<div class="line"></div>
<div class="line">uint8_t ch ;</div>
<div class="line">uart &gt;&gt; ch;</div>
</div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="af56764abe8954430eede10e253f8994f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual uint8_t CStream::read </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Read a byte from stream </p>
<dl class="section return"><dt>Returns</dt><dd>uint8_t (8 bits) data from the stream </dd></dl>

</div>
</div>
<a class="anchor" id="a9b658bf4bc4d81413627bc2fe81e1471"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int CSerial::read </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>block</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Call the member function to read a data block from serial port. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">buf</td><td>is a pointer which contain the data block from serial port. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">len</td><td>is a integer to specified the buffer length. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">block</td><td>is a boolean value to specified to wait for reading. </td></tr>
  </table>
  </dd>
</dl>

<p>Reimplemented from <a class="el" href="../../d4/d16/class_c_stream.html#a80977482ffb2f7b626a9f29f437b7d8d">CStream</a>.</p>

</div>
</div>
<a class="anchor" id="a0748723f610ddcfdc34286dbbfbd4917"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int CSerial::readable </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Call the member function to check that receive buffer is ready to read. </p>
<dl class="section return"><dt>Returns</dt><dd>greater than zero if receive data from serial port. </dd></dl>

<p>Reimplemented from <a class="el" href="../../d4/d16/class_c_stream.html#a96328807241e15017868b845b06fd9e4">CStream</a>.</p>

</div>
</div>
<a class="anchor" id="a0c80ea521e310305579e787f21a55233"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void CSerial::settings </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>baudrate</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d8/d1d/class_c_serial.html#ad38b0926868c6cfabb59e2da94f1cf40">UART_PARITY_T</a>&#160;</td>
          <td class="paramname"><em>parity</em> = <code><a class="el" href="../../d8/d1d/class_c_serial.html#ad38b0926868c6cfabb59e2da94f1cf40a77e567bbd57497e51b0161ed1cd855a4">UART_PARITY_NONE</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d8/d1d/class_c_serial.html#a628c8c9be04f0315c4dae70ce8ccc5b3">UART_DATABIT_T</a>&#160;</td>
          <td class="paramname"><em>databits</em> = <code><a class="el" href="../../d8/d1d/class_c_serial.html#a628c8c9be04f0315c4dae70ce8ccc5b3a196b716ca31d23301c1059b53ac35f25">UART_DATABIT_8</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d8/d1d/class_c_serial.html#af02af389f5596b7b40cf0d2ece57b04b">UART_STOPBIT_T</a>&#160;</td>
          <td class="paramname"><em>stopbits</em> = <code><a class="el" href="../../d8/d1d/class_c_serial.html#af02af389f5596b7b40cf0d2ece57b04ba6351eeac6c2e865ed9019323e2491907">UART_STOPBIT_1</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d8/d1d/class_c_serial.html#a767bb157f0f469eb5bf5c99b8ada42f1">UART_FITO_LEVEL_T</a>&#160;</td>
          <td class="paramname"><em>level</em> = <code><a class="el" href="../../d8/d1d/class_c_serial.html#a767bb157f0f469eb5bf5c99b8ada42f1aec8c4b69719ee6b1dc43cf6ccdd999de">UART_FIFO_TRGLEV0</a></code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Outmoded, redirect to <a class="el" href="../../d8/d1d/class_c_serial.html#aff7c822bada51065ad52542fb9515be6">enable()</a> </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../d4/d70/_2ble_2ble_heartrate_2src_2main_8cpp-example.html#a15">/ble/ble_heartrate/src/main.cpp</a>, <a class="el" href="../../d5/df3/_2ble_2ble_multiple_2src_2main_8cpp-example.html#a22">/ble/ble_multiple/src/main.cpp</a>, <a class="el" href="../../d7/d19/_2ble_2ble_proximity_2src_2main_8cpp-example.html#a14">/ble/ble_proximity/src/main.cpp</a>, <a class="el" href="../../db/de1/_2misc_2garbage_collector_2src_2main_8cpp-example.html#a14">/misc/garbage_collector/src/main.cpp</a>, <a class="el" href="../../d5/dec/_2peripheral_2adc_2src_2main_8cpp-example.html#a3">/peripheral/adc/src/main.cpp</a>, <a class="el" href="../../de/dd2/_2peripheral_2eeprom_2src_2main_8cpp-example.html#a3">/peripheral/eeprom/src/main.cpp</a>, <a class="el" href="../../df/dd4/_2peripheral_2i2c_scanner_2src_2main_8cpp-example.html#a3">/peripheral/i2c_scanner/src/main.cpp</a>, <a class="el" href="../../d9/da4/_2peripheral_2power_2src_2main_8cpp-example.html#a9">/peripheral/power/src/main.cpp</a>, <a class="el" href="../../d5/d72/_2peripheral_2spi_2src_2main_8cpp-example.html#a3">/peripheral/spi/src/main.cpp</a>, <a class="el" href="../../d3/d38/_2peripheral_2timer_2src_2main_8cpp-example.html#a3">/peripheral/timer/src/main.cpp</a>, <a class="el" href="../../d1/d0a/_2peripheral_2uart_2src_2main_8cpp-example.html#a9">/peripheral/uart/src/main.cpp</a>, <a class="el" href="../../d0/d46/_2peripheral_2watchdog_2src_2main_8cpp-example.html#a11">/peripheral/watchdog/src/main.cpp</a>, and <a class="el" href="../../da/da9/_2rtos_2blink_thread_2src_2main_8cpp-example.html#a11">/rtos/blink_thread/src/main.cpp</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="a48041fea5cad32feaeef543bcaa2d37d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void CStream::write </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>c</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Write a byte to stream </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">c</td><td>is a uint8_t data to send to the stream. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="adef6d3e77843c65617b7cb555c2f8732"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int CSerial::write </td>
          <td>(</td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>block</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Call the member function to write a data block to serial port </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">buf</td><td>is a pointer which data block want to send to serial port. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">len</td><td>is a integer value to specified the buffer length. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">block</td><td>is a boolean value to specified to wait for writing. </td></tr>
  </table>
  </dd>
</dl>

<p>Reimplemented from <a class="el" href="../../d4/d16/class_c_stream.html#a172fe857c74488b881007c65cc2e9552">CStream</a>.</p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../d1/d0a/_2peripheral_2uart_2src_2main_8cpp-example.html#a5">/peripheral/uart/src/main.cpp</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="ac59cfe80216e1fb7eb479017f0bb8e7f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int CSerial::writeable </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Call the member function to check that transmit buffer is ready to write. </p>
<dl class="section return"><dt>Returns</dt><dd>how many bytes can be write to transmit buffer. </dd></dl>

<p>Reimplemented from <a class="el" href="../../d4/d16/class_c_stream.html#a56ec27ee664f1a4eb9910988b78833d5">CStream</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="../../d8/d1d/class_c_serial.html">CSerial</a></li>
    <li class="footer">Generated on Fri Apr 11 2014 23:43:26 for uCXpresso.BLE by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
  </ul>
</div>
</body>
</html>
